<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	
	<!-- 包含头部页面 -->
	<jsp:include page="/head.jsp"></jsp:include>
	
	<table border="1" align="center" width="80%" cellpadding="5" cellspacing="0">
		<thead>
			<tr>
				<th>序号</th>
				<th>员工编号</th>
				<th>员工姓名</th>
				<th>员工薪水</th>
				<th>操作</th>
			</tr>
			<c:if test="${requestScope.listEmp != null }">
				<c:forEach items="${requestScope.listEmp }" var="emp" varStatus="st">
					<tr>
						<td>${st.count }</td>
						<td>${emp.id }</td>
						<td>${emp.empName }</td>
						<td>${emp.salary }</td>
						<td>
							<a href="/emp_viewUpdate?employee.id=${emp.id }">修改</a>
							<a href="/emp_delete?employee.id=${emp.id }">删除</a>
						</td>
					</tr>
				</c:forEach>
			</c:if>
			<c:if test="${requestScope.listEmp == null }">
				<tr>
  	 				<td colspan="5">对不起，没有你要找的数据！请先录入。</td>
  	 			</tr>
			</c:if>
		</thead>
		
	</table>
</body>
</html>